import { car_information } from './car_imformation';

/**
 * 转换玩家赛车数据类型
 */
export class ChangeType {
  /**
   * 转换玩家赛车数据类型
   */
  static change1(entity: GameEntity) {
    for (let i = 0; i < entity.dz.name.length; i++) {
      entity.cars[i] = {
        id: entity.dz.name[i],
        name: entity.dz.name[i],
      };
    }
  }
  /**
   * 获取玩家赛车信息
   */
  static getCarInformation(id: string) {
    return car_information[id as keyof typeof car_information];
  }
}
